<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>XMP Toolkit SDK: XMP_IO Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xmp_tagline_small.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XMP Toolkit SDK
   &#160;<span id="projectnumber">6.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classXMP__IO.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="classXMP__IO-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">XMP_IO Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Abstract base class for client-managed I/O with <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code>.  
 <a href="classXMP__IO.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:af77f9218892471ffad4586413ecd0dca"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="classXMP__IO.html#af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55">kReadAll</a> = true
 }</td></tr>
<tr class="separator:af77f9218892471ffad4586413ecd0dca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0a0db95509e567f29f34570d5042aa54"><td class="memItemLeft" align="right" valign="top">virtual XMP_Uns32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a0a0db95509e567f29f34570d5042aa54">Read</a> (void *buffer, XMP_Uns32 count, bool readAll=false)=0</td></tr>
<tr class="memdesc:a0a0db95509e567f29f34570d5042aa54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read into a buffer, returning the number of bytes read.  <a href="classXMP__IO.html#a0a0db95509e567f29f34570d5042aa54">More...</a><br /></td></tr>
<tr class="separator:a0a0db95509e567f29f34570d5042aa54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d0b45799793c5fa3dc567556f93cceb"><td class="memItemLeft" align="right" valign="top">XMP_Uns32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a0d0b45799793c5fa3dc567556f93cceb">ReadAll</a> (void *buffer, XMP_Uns32 bytes)</td></tr>
<tr class="separator:a0d0b45799793c5fa3dc567556f93cceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab48d705ca0e3fb22d84c7a323951f8e4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#ab48d705ca0e3fb22d84c7a323951f8e4">Write</a> (const void *buffer, XMP_Uns32 count)=0</td></tr>
<tr class="memdesc:ab48d705ca0e3fb22d84c7a323951f8e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write from a buffer.  <a href="classXMP__IO.html#ab48d705ca0e3fb22d84c7a323951f8e4">More...</a><br /></td></tr>
<tr class="separator:ab48d705ca0e3fb22d84c7a323951f8e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c05bb22ecc75e71ecc546bcb756d628"><td class="memItemLeft" align="right" valign="top">virtual XMP_Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek</a> (XMP_Int64 offset, <a class="el" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563f">SeekMode</a> mode)=0</td></tr>
<tr class="memdesc:a9c05bb22ecc75e71ecc546bcb756d628"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the I/O position, returning the new absolute offset in bytes.  <a href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">More...</a><br /></td></tr>
<tr class="separator:a9c05bb22ecc75e71ecc546bcb756d628"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa14274c6ed95da83a95e8786b7b1a91e"><td class="memItemLeft" align="right" valign="top">XMP_Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#aa14274c6ed95da83a95e8786b7b1a91e">Offset</a> ()</td></tr>
<tr class="separator:aa14274c6ed95da83a95e8786b7b1a91e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a456f92ca90a83095dbd90786a26b64e1"><td class="memItemLeft" align="right" valign="top">XMP_Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a456f92ca90a83095dbd90786a26b64e1">Rewind</a> ()</td></tr>
<tr class="separator:a456f92ca90a83095dbd90786a26b64e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51b53ca05c5627da08cd934a9ed8b281"><td class="memItemLeft" align="right" valign="top">XMP_Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a51b53ca05c5627da08cd934a9ed8b281">ToEOF</a> ()</td></tr>
<tr class="separator:a51b53ca05c5627da08cd934a9ed8b281"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4fe442d5f7ea3d062bb5dfeadfa2335"><td class="memItemLeft" align="right" valign="top">virtual XMP_Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#af4fe442d5f7ea3d062bb5dfeadfa2335">Length</a> ()=0</td></tr>
<tr class="memdesc:af4fe442d5f7ea3d062bb5dfeadfa2335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the length of the file in bytes.  <a href="classXMP__IO.html#af4fe442d5f7ea3d062bb5dfeadfa2335">More...</a><br /></td></tr>
<tr class="separator:af4fe442d5f7ea3d062bb5dfeadfa2335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7dc2bd067498a651597a6b128f02dbb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#af7dc2bd067498a651597a6b128f02dbb">Truncate</a> (XMP_Int64 length)=0</td></tr>
<tr class="memdesc:af7dc2bd067498a651597a6b128f02dbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Truncate the file to the given length.  <a href="classXMP__IO.html#af7dc2bd067498a651597a6b128f02dbb">More...</a><br /></td></tr>
<tr class="separator:af7dc2bd067498a651597a6b128f02dbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac989de23f8fed2efcca71f5a3aa35695"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classXMP__IO.html">XMP_IO</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#ac989de23f8fed2efcca71f5a3aa35695">DeriveTemp</a> ()=0</td></tr>
<tr class="memdesc:ac989de23f8fed2efcca71f5a3aa35695"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an associated temp file for use in a safe-save style operation.  <a href="classXMP__IO.html#ac989de23f8fed2efcca71f5a3aa35695">More...</a><br /></td></tr>
<tr class="separator:ac989de23f8fed2efcca71f5a3aa35695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad4cf42485e9d8319a07f4ecdde4ee34"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#aad4cf42485e9d8319a07f4ecdde4ee34">AbsorbTemp</a> ()=0</td></tr>
<tr class="memdesc:aad4cf42485e9d8319a07f4ecdde4ee34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the owning file's content with that of the temp.  <a href="classXMP__IO.html#aad4cf42485e9d8319a07f4ecdde4ee34">More...</a><br /></td></tr>
<tr class="separator:aad4cf42485e9d8319a07f4ecdde4ee34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a337ddf3f954d2b4e8dce1d70d8c33ddb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a337ddf3f954d2b4e8dce1d70d8c33ddb">DeleteTemp</a> ()=0</td></tr>
<tr class="memdesc:a337ddf3f954d2b4e8dce1d70d8c33ddb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete a temp file, leaving the original alone.  <a href="classXMP__IO.html#a337ddf3f954d2b4e8dce1d70d8c33ddb">More...</a><br /></td></tr>
<tr class="separator:a337ddf3f954d2b4e8dce1d70d8c33ddb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38ca896e79705a0e4228eb67d3426c65"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a38ca896e79705a0e4228eb67d3426c65">XMP_IO</a> ()</td></tr>
<tr class="separator:a38ca896e79705a0e4228eb67d3426c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52825d62e1a93ae1ee157d68860b6815"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a52825d62e1a93ae1ee157d68860b6815">~XMP_IO</a> ()</td></tr>
<tr class="separator:a52825d62e1a93ae1ee157d68860b6815"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a4d2db45adc8f5bbe761434d4a8506d07"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a4d2db45adc8f5bbe761434d4a8506d07">XMP_IO</a> (const <a class="el" href="classXMP__IO.html">XMP_IO</a> &amp;original)</td></tr>
<tr class="separator:a4d2db45adc8f5bbe761434d4a8506d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a1c16d56b845392cef6fa1e2cd75635"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXMP__IO.html#a3a1c16d56b845392cef6fa1e2cd75635">operator=</a> (const <a class="el" href="classXMP__IO.html">XMP_IO</a> &amp;)</td></tr>
<tr class="separator:a3a1c16d56b845392cef6fa1e2cd75635"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Abstract base class for client-managed I/O with <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code>. </p>
<p><code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> is an abstract base class for client-managed I/O with <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code>. This allows a client to use the embedded metadata processing logic of <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code> in cases where a string file path cannot be provided, or where it is impractical to allow <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code> to separately open the file and do its own I/O. Although described in terms of files, any form of storage may be used as long as the functions operate as defined.</p>
<p>This is not a general purpose I/O class. It contains only the necessary functions needed by the internals of <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code>. It is intended to be used as an adaptor for an existing I/O mechanism that the client wants <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code> to use.</p>
<p>To use <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code>, a client creates a derived class then uses the form of <code>TCMPFiles::OpenFile</code> that takes an <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> parameter instead of a string file path. The derived <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object must be ready for use when <code>TCMPFiles::OpenFile</code> is called.</p>
<p>There are no Open or Close functions in <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code>, they are specific to each implementation. The derived <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object must be open and ready for use before being passed to <code>TXMP_Files::OpenFile</code>, and remain open and ready for use until <code>TXMP_Files::CloseFile</code> returns, or some other fatal error occurs. The client has final responsibility for closing and terminating the derived <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object. </p>

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00044">44</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="af77f9218892471ffad4586413ecd0dca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af77f9218892471ffad4586413ecd0dca">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55"></a>kReadAll&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00046">46</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{ <a class="code" href="classXMP__IO.html#af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55">kReadAll</a> = <span class="keyword">true</span> };</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a38ca896e79705a0e4228eb67d3426c65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38ca896e79705a0e4228eb67d3426c65">&#9670;&nbsp;</a></span>XMP_IO() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_IO::XMP_IO </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00157">157</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;{};</div>
</div><!-- fragment -->
</div>
</div>
<a id="a52825d62e1a93ae1ee157d68860b6815"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52825d62e1a93ae1ee157d68860b6815">&#9670;&nbsp;</a></span>~XMP_IO()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual XMP_IO::~XMP_IO </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00158">158</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;{};</div>
</div><!-- fragment -->
</div>
</div>
<a id="a4d2db45adc8f5bbe761434d4a8506d07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d2db45adc8f5bbe761434d4a8506d07">&#9670;&nbsp;</a></span>XMP_IO() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_IO::XMP_IO </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXMP__IO.html">XMP_IO</a> &amp;&#160;</td>
          <td class="paramname"><em>original</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Copy construction and assignment are not public. That would require the implementation to share state across multiple <a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a> objects. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aad4cf42485e9d8319a07f4ecdde4ee34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad4cf42485e9d8319a07f4ecdde4ee34">&#9670;&nbsp;</a></span>AbsorbTemp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void XMP_IO::AbsorbTemp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Replace the owning file's content with that of the temp. </p>
<p>Used at the end of a safe-save style operation to replace the original content with that from the associated temp file. The temp file must be closed and deleted after the content swap. The temporary <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object is deleted. Throws an exception if the temp file cannot be absorbed. Throwing <code>XMPError</code> is recommended. </p>

</div>
</div>
<a id="a337ddf3f954d2b4e8dce1d70d8c33ddb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a337ddf3f954d2b4e8dce1d70d8c33ddb">&#9670;&nbsp;</a></span>DeleteTemp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void XMP_IO::DeleteTemp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Delete a temp file, leaving the original alone. </p>
<p>Used for a failed safe-save style operation. The temp file is closed and deleted without being absorbed, and the temporary <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object is deleted. Does nothing if no temp exists. </p>

</div>
</div>
<a id="ac989de23f8fed2efcca71f5a3aa35695"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac989de23f8fed2efcca71f5a3aa35695">&#9670;&nbsp;</a></span>DeriveTemp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classXMP__IO.html">XMP_IO</a>* XMP_IO::DeriveTemp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an associated temp file for use in a safe-save style operation. </p>
<p>Create an associated temp file, for example in the same directory and with a related name. Returns an already existing temp with no other action. The temp must be opened for read-write access. It will be used in a safe-save style operation, using some of the original file plus new portions to write the temp, then replacing the original from the temp when done. Throws an exception if the owning object is opened for read-only access, or if the temp file cannot be created. Throwing <code>XMPError</code> is recommended.</p>
<p>The temp file is normally closed and deleted, and the temporary <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object deleted, by a call to <code>AbsorbTemp</code> or <code>DeleteTemp</code>. It must be closed and deleted by the derived <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object's destructor if necessary.</p>
<p><code>DeriveTemp</code> may be called on a temporary <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object.</p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the associated temporary <code><a class="el" href="classXMP__IO.html" title="Abstract base class for client-managed I/O with TXMPFiles.">XMP_IO</a></code> object. </dd></dl>

</div>
</div>
<a id="af4fe442d5f7ea3d062bb5dfeadfa2335"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4fe442d5f7ea3d062bb5dfeadfa2335">&#9670;&nbsp;</a></span>Length()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual XMP_Int64 XMP_IO::Length </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the length of the file in bytes. </p>
<p>Return the length of the file in bytes. The I/O position is unchanged.</p>
<dl class="section return"><dt>Returns</dt><dd>The length of the file in bytes. </dd></dl>

</div>
</div>
<a id="aa14274c6ed95da83a95e8786b7b1a91e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa14274c6ed95da83a95e8786b7b1a91e">&#9670;&nbsp;</a></span>Offset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_Int64 XMP_IO::Offset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00092">92</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek</a> ( 0, <a class="code" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563fa4e179367a02390075e632aca6e115925">kXMP_SeekFromCurrent</a> ); };</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="XMP__Const_8h_source.html#l00876">kXMP_SeekFromCurrent</a>, and <a class="el" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek()</a>.</p>

</div>
</div>
<a id="a3a1c16d56b845392cef6fa1e2cd75635"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a1c16d56b845392cef6fa1e2cd75635">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void XMP_IO::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXMP__IO.html">XMP_IO</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>this = in;</p>

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00167">167</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;{ <span class="comment">/* Avoid Win compile warnings. */</span> };</div>
</div><!-- fragment -->
</div>
</div>
<a id="a0a0db95509e567f29f34570d5042aa54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a0db95509e567f29f34570d5042aa54">&#9670;&nbsp;</a></span>Read()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual XMP_Uns32 XMP_IO::Read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMP_Uns32&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>readAll</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read into a buffer, returning the number of bytes read. </p>
<p>Read into a buffer, returning the number of bytes read. Returns the actual number of bytes read. Throws an exception if requireSuccess is true and not enough data is available. Throwing <code>XMPError</code> is recommended. The buffer content and I/O position after a throw are undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>A pointer to the buffer. </td></tr>
    <tr><td class="paramname">count</td><td>The length of the buffer in bytes. </td></tr>
    <tr><td class="paramname">readAll</td><td>True if reading less than the requested amount is a failure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the number of bytes read. </dd></dl>

<p class="reference">Referenced by <a class="el" href="XMP__IO_8hpp_source.html#l00063">ReadAll()</a>.</p>

</div>
</div>
<a id="a0d0b45799793c5fa3dc567556f93cceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d0b45799793c5fa3dc567556f93cceb">&#9670;&nbsp;</a></span>ReadAll()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_Uns32 XMP_IO::ReadAll </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMP_Uns32&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00063">63</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                { <span class="keywordflow">return</span> this-&gt;<a class="code" href="classXMP__IO.html#a0a0db95509e567f29f34570d5042aa54">Read</a> ( buffer, bytes, <a class="code" href="classXMP__IO.html#af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55">kReadAll</a> ); };</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="XMP__IO_8hpp_source.html#l00046">kReadAll</a>, and <a class="el" href="classXMP__IO.html#a0a0db95509e567f29f34570d5042aa54">Read()</a>.</p>

</div>
</div>
<a id="a456f92ca90a83095dbd90786a26b64e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a456f92ca90a83095dbd90786a26b64e1">&#9670;&nbsp;</a></span>Rewind()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_Int64 XMP_IO::Rewind </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00093">93</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek</a> ( 0, <a class="code" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563faf52720b8c894653e4a089a9c0331ee47">kXMP_SeekFromStart</a> ); };       <span class="comment">// Always returns 0.</span></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="XMP__Const_8h_source.html#l00876">kXMP_SeekFromStart</a>, and <a class="el" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek()</a>.</p>

</div>
</div>
<a id="a9c05bb22ecc75e71ecc546bcb756d628"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c05bb22ecc75e71ecc546bcb756d628">&#9670;&nbsp;</a></span>Seek()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual XMP_Int64 XMP_IO::Seek </td>
          <td>(</td>
          <td class="paramtype">XMP_Int64&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563f">SeekMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the I/O position, returning the new absolute offset in bytes. </p>
<p>Set the I/O position, returning the new absolute offset in bytes. The offset parameter may be positive or negative. A seek beyond EOF is allowed when writing and extends the file, it is equivalent to seeking to EOF then writing the needed amount of undefined data. A read-only seek beyond EOF throws an exception. Throwing <code>XMPError</code> is recommended.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offset</td><td>The offset relative to the mode. </td></tr>
    <tr><td class="paramname">mode</td><td>The mode, or origin, of the seek.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new absolute offset in bytes. </dd></dl>

<p class="reference">Referenced by <a class="el" href="XMP__IO_8hpp_source.html#l00092">Offset()</a>, <a class="el" href="XMP__IO_8hpp_source.html#l00093">Rewind()</a>, and <a class="el" href="XMP__IO_8hpp_source.html#l00094">ToEOF()</a>.</p>

</div>
</div>
<a id="a51b53ca05c5627da08cd934a9ed8b281"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51b53ca05c5627da08cd934a9ed8b281">&#9670;&nbsp;</a></span>ToEOF()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">XMP_Int64 XMP_IO::ToEOF </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="XMP__IO_8hpp_source.html#l00094">94</a> of file <a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek</a> ( 0, <a class="code" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563faeedc991a0194b932ae4a47307843baf6">kXMP_SeekFromEnd</a> ); };</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="XMP__Const_8h_source.html#l00876">kXMP_SeekFromEnd</a>, and <a class="el" href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">Seek()</a>.</p>

</div>
</div>
<a id="af7dc2bd067498a651597a6b128f02dbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7dc2bd067498a651597a6b128f02dbb">&#9670;&nbsp;</a></span>Truncate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void XMP_IO::Truncate </td>
          <td>(</td>
          <td class="paramtype">XMP_Int64&#160;</td>
          <td class="paramname"><em>length</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Truncate the file to the given length. </p>
<p>Truncate the file to the given length. The I/O position after truncation is unchanged if still valid, otherwise it is set to the new EOF. Throws an exception if the new length is longer than the file's current length. Throwing <code>XMPError</code> is recommended.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">length</td><td>The new length for the file, must be less than or equal to the current length. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab48d705ca0e3fb22d84c7a323951f8e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab48d705ca0e3fb22d84c7a323951f8e4">&#9670;&nbsp;</a></span>Write()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void XMP_IO::Write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMP_Uns32&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write from a buffer. </p>
<p>Write from a buffer, overwriting existing data and extending the file as necesary. All data must be written or an exception thrown. Throwing <code>XMPError</code> is recommended.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>A pointer to the buffer. </td></tr>
    <tr><td class="paramname">count</td><td>The length of the buffer in bytes. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>public/include/<a class="el" href="XMP__IO_8hpp_source.html">XMP_IO.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aXMP__Const_8h_html_a84d76d32dd4ef90e5a90cf759b7e563faeedc991a0194b932ae4a47307843baf6"><div class="ttname"><a href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563faeedc991a0194b932ae4a47307843baf6">kXMP_SeekFromEnd</a></div><div class="ttdeci">@ kXMP_SeekFromEnd</div><div class="ttdef"><b>Definition:</b> <a href="XMP__Const_8h_source.html#l00876">XMP_Const.h:876</a></div></div>
<div class="ttc" id="aXMP__Const_8h_html_a84d76d32dd4ef90e5a90cf759b7e563fa4e179367a02390075e632aca6e115925"><div class="ttname"><a href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563fa4e179367a02390075e632aca6e115925">kXMP_SeekFromCurrent</a></div><div class="ttdeci">@ kXMP_SeekFromCurrent</div><div class="ttdef"><b>Definition:</b> <a href="XMP__Const_8h_source.html#l00876">XMP_Const.h:876</a></div></div>
<div class="ttc" id="aclassXMP__IO_html_af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55"><div class="ttname"><a href="classXMP__IO.html#af77f9218892471ffad4586413ecd0dcaa148a2bca28df5b2d143590aae5153b55">XMP_IO::kReadAll</a></div><div class="ttdeci">@ kReadAll</div><div class="ttdef"><b>Definition:</b> <a href="XMP__IO_8hpp_source.html#l00046">XMP_IO.hpp:46</a></div></div>
<div class="ttc" id="aclassXMP__IO_html_a9c05bb22ecc75e71ecc546bcb756d628"><div class="ttname"><a href="classXMP__IO.html#a9c05bb22ecc75e71ecc546bcb756d628">XMP_IO::Seek</a></div><div class="ttdeci">virtual XMP_Int64 Seek(XMP_Int64 offset, SeekMode mode)=0</div><div class="ttdoc">Set the I/O position, returning the new absolute offset in bytes.</div></div>
<div class="ttc" id="aXMP__Const_8h_html_a84d76d32dd4ef90e5a90cf759b7e563faf52720b8c894653e4a089a9c0331ee47"><div class="ttname"><a href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563faf52720b8c894653e4a089a9c0331ee47">kXMP_SeekFromStart</a></div><div class="ttdeci">@ kXMP_SeekFromStart</div><div class="ttdef"><b>Definition:</b> <a href="XMP__Const_8h_source.html#l00876">XMP_Const.h:876</a></div></div>
<div class="ttc" id="aclassXMP__IO_html_a0a0db95509e567f29f34570d5042aa54"><div class="ttname"><a href="classXMP__IO.html#a0a0db95509e567f29f34570d5042aa54">XMP_IO::Read</a></div><div class="ttdeci">virtual XMP_Uns32 Read(void *buffer, XMP_Uns32 count, bool readAll=false)=0</div><div class="ttdoc">Read into a buffer, returning the number of bytes read.</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classXMP__IO.html">XMP_IO</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
